package cn.roadtrip.utilmodule.util.enumpck;

public enum Enum_InsuranceType {
    //，；，；，；，
    //，；，；，
    WaitPay("WaitPay", "待付款"),
    Sucess("Sucess", "付款成功"),
    PayFail("PayFail", "付款失败"),
    PayBack("PayBack", "退款")
    ;

    private String s;
    private String title;

    Enum_InsuranceType(String s, String title) {
        this.s = s;
        this.title = title;
    }

    Enum_InsuranceType(String s) {
        this.s = s;
        this.title = Enum_HotelRoomType.parseCode(s).getTitle();
    }

    public String getTitle() {
        return this.title;
    }

    public String getCode() {
        return this.s;
    }

    public static final Enum_InsuranceType parseCode(String code) {
        switch (code) {
            case "WaitPay":
                return WaitPay;
            case "Sucess":
                return Sucess;
            case "PayFail":
                return PayFail;
            case "PayBack":
                return PayBack;
        }
        return null;
    }

    @Override
    public String toString() {
        return "(code:%s, title:%s)".formatted(this.s, this.title);
    }
}
